#include<stdio.h>
#include<assert.h>
int my_strnlen(const char* arr, int count)
{
	assert(arr);
	int k = 0;
	while (count-- && *arr++ != '\0')
	{
		k++;
	}
	return k;
	
}
int main()
{
	char arr[] = "abcdef";
	int ret = my_strnlen(arr, 7);
	printf("%d\n", ret);
	return 0;
}